using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Tools : MonoBehaviour
{
    // 加载Sprite资源
    public static Sprite ResourcesSprite(string path)
    {
        return Resources.Load<Sprite>(path);
    }
    public static GameObject ResourcesGameObject(string path)
    {
        return Resources.Load<GameObject>(path);
    }

    // 删除tag标记的GameObject的列表
    public static void DeleteChoices(string tag) {
        GameObject[] gameObjects = GameObject.FindGameObjectsWithTag(tag);
        foreach (GameObject gameObject in gameObjects) {
            Destroy(gameObject);
        }
    }

}
